package org.elephas.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ManyToOne;

/**
 * <p>User: Nick Heudecker</p>
 * <p>Date: Jan 27, 2008</p>
 * <p>Time: 5:49:33 PM</p>
 */
@Entity
public class BlogMembership extends AbstractPersistent {

    @ManyToOne
    private Blog blog;

    @ManyToOne(cascade = CascadeType.PERSIST)
    private User user;

    @Enumerated(EnumType.STRING)
    private BlogRole blogRole;

    public Blog getBlog() {
        return blog;
    }

    public void setBlog(Blog blog) {
        this.blog = blog;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public BlogRole getBlogRole() {
        return blogRole;
    }

    public void setBlogRole(BlogRole blogRole) {
        this.blogRole = blogRole;
    }
}
